package com.prim.threadcoreknowledge.createthread.wrongways;

import java.util.Arrays;

/**
 * 匿名内部类
 */
public class AnonymousinnerClassDemo {
    public static void main(String[] args) {
        new Thread(
                new Runnable() {
                    @Override
                    public void run() {
                        System.out.println(Thread.currentThread().getName());
                    }
                }
        ).start();
        new Thread() {
            @Override
            public void run() {
                System.out.println(Thread.currentThread().getName());
            }
        }.start();

        new Thread(() -> System.out.println(Thread.currentThread())).start();
    }
}
